﻿namespace MefContrib.Models.Provider.Validation
{
    /// <summary>
    /// 
    /// </summary>
    public static class RequireExtension
    {
        /// <summary>
        /// 
        /// </summary>
        /// <typeparam name="T">The type of the argument which it going to be validated.</typeparam>
        /// <param name="target"></param>
        /// <param name="name"></param>
        /// <returns>A <see cref="Validator{T}"/> object.</returns>
        public static Validator<T> Require<T>(this T target, string name)
        {
            return new Validator<T>(target, name);
        }
    }
}